package missing_break_in_switch;

public class Test {
	static final int CANCELLED 	= 1;
	static final int NEW 		= 2;
	static final int REMOVED 	= 3;
	static final int OTHER 		= 4;
	static final int ERROR 		= 5;
	
	public void bar(int status) {
		
	    switch(status) {
	      case CANCELLED:
	        doCancelled();
	        // break; hm, should this be commented out?
	        
	      case NEW:
	        doNew();
	        // is this really a fall-through?
	        
	      case REMOVED:
	        doRemoved();
	        // what happens if you add another case after this one?
	        
	      case OTHER: //empty case-interpreted as an intentional fall-through
	    	  
	      case ERROR:
	        doErrorHandling();
	        break;
	    }
	    
	}

	void doCancelled() { }
	void doNew() { }
	void doRemoved() { }
	void doErrorHandling() { }
}
